home *** CD-ROM | disk | FTP | other *** search
/ System Booster / System Booster.iso / Texteditors / Origami / bindings / origami.keys < prev    next >
Text File  |  1996-09-26  |  9KB  |  274 lines

  1. ;OCL{{{}}}
  2. ;OCL{{{  names and modes
  3. ( defbinding BasicOrigami )
  4. ( overload-prefix ( mori ) )
  5. ( defmodes ( edit folding ) )
  6. ;OCL}}}
  7. ;OCL{{{  menues
  8. ( defvar ( x y ) )
  9. ;OCL{{{  init-x-menu
  10. ( defmac init-x-menu ( set x 2 ) )
  11. ;OCL}}}
  12. ;OCL{{{  edit-menu
  13. ( deffun edit-menu
  14.    ( init-x-menu
  15.      set y 1
  16.      write-area x y ( "  "C "- "W "  "  "o "p "e "n "- "f "o "l "d "  "  "C "- "E "  "  "u "p "  "  "  "  "C "- "R "  "  "c "l "o "s "e "- "f "o "l "d "  "  "  "C "- "Q "  "q "  "  "  "  "q "u "i "t "  "  "  "  "  "  "  "  "  "  "  "  "  "  "  "  "  "  "  )
  17.      set y 2
  18.      write-area x y ( "  "C "- "S "  "  "b "a "c "k "w "a "r "d "  "  "  "  "  "  "  "  "  "  "  "  "  "  "C "- "D "  "  "f "o "r "w "a "r "d "  "  "  "  "  "  "C "- "Q "  "s "  "  "  "  "s "a "v "e "- "f "i "l "e "  "  "  "  "  "  "  "  "  "  "  "  "  "  )
  19.      set y 3
  20.      write-area x y ( "  "C "- "L "  "  "d "e "l ". "- "l "i "n "e "  "  "C "- "X "  "  "d "o "w "n "  "  "C "- "U "  "  "u "n "f "o "l "d "  "  "  "  "  "  "  "C "- "H "  "  "  "  "  "  "d "e "l "e "t "e "- "p "r "e "v "i "o "u "s "- "c "h "a "r "  "  "  )
  21.      set y 4
  22.      write-area x y ( "< "< "E "d "i "t "> "> "  "  "  "  "  "e "s "c "  "e "s "c "  "  "F "o "l "d "i "n "g "  "  "  "  "  "  "  "  "  "  "  "  "  "  "  "  "  "C "- "Q "  "C "- "Q "  "  "r "e "f "r "e "s "h "- "s "c "r "e "e "n "  "  "  "  "  "  "  "  "  )
  23.      set x 999
  24.      write-area x y ( "  )
  25.    )
  26. )
  27. ;OCL}}}
  28. ;OCL{{{  fold-menu
  29. ( deffun fold-menu
  30.    ( init-x-menu
  31.      set y 1
  32.      write-area x y ( "  "C "- "W "  "  "o "p "e "n "- "f "o "l "d "  "  "C "- "E "  "  "u "p "  "  "  "  "C "- "R "  "  "c "l "o "s "e "- "f "o "l "d "  "  "  "f "  "  "  "  "  "  "  "  "f "o "l "d "- "s "e "l "e "c "t "i "o "n "  "  "  "  "  "  "  "  "  )
  33.      set y 2
  34.      write-area x y ( "  "C "- "S "  "  "b "a "c "k "w "a "r "d "  "  "  "  "  "  "  "  "  "  "  "  "  "  "C "- "D "  "  "f "o "r "w "a "r "d "  "  "  "  "  "  "l "  "  "  "  "  "  "  "  "s "e "t "- "l "a "n "g "u "a "g "e "  "  "  "  "  "  "  "  "  "  "  )
  35.      set y 3
  36.      write-area x y ( "  "  "  "  "  "  "  "  "  "  "  "  "  "  "  "  "  "C "- "X "  "  "d "o "w "n "  "  "  "  "  "  "  "  "  "  "  "  "  "  "  "  "  "  "  "  "  "  "  "  "  "  "  "  "  "  "  "  "  "  "  "  "  "  "  "  "  "  "  "  "  "  "  "  "  "  "  "  )
  37.      set y 4
  38.      write-area x y ( "< "< "F "o "l "d "> "> "  "  "  "  "  "e "s "c "  "e "s "c "  "  "E "d "i "t "i "n "g "  "  "  "  "  "  "  "  "  "  "  "  "  "  "  "  "  "C "- "Q "  "C "- "Q "  "  "r "e "f "r "e "s "h "- "s "c "r "e "e "n "  "  "  "  "  "  "  "  "  )
  39.      set x 999
  40.      write-area x y ( "  )
  41.    )
  42. )
  43. ;OCL}}}
  44. ;OCL{{{  lang-menu
  45. ( deffun lang-menu
  46.    ( init-x-menu
  47.      set y 1
  48.      write-area x y ( "  "S "e "l "e "c "t "  "a "  "l "a "n "g "u "a "g "e "  "b "y ": "  "  "  "  "t "y "p "i "n "g "  "t "h "e "  "f "i "r "s "t "  "c "h "a "r "a "c "t "e "r "  "  "  "  "  "  "  "  "  "  "  "  "  "  "  "  "  "  "  "  "  "  "  "  "  "  )
  49.      set y 2
  50.      write-area x y ( "  "  "  "  "  "  "  "  "  "  "  "  "  "  "  "  "  "  "  "  "  "  "  "o "r "  "m "o "v "e "  "w "i "t "h "  "C "- "S "/ "C "- "D "  "a "n "d "  "r "e "t "u "r "n "  "  "  "  "  "  "  "  "  "  "  "  "  "  "  "  "  "  "  "  "  "  "  "  )
  51.      set y 3
  52.      write-area x y ( "  "U "s "e "r "  "p "r "o "m "p "t "s "  "f "o "r "  "n "e "w "  "b "e "g "i "n "- "  "a "n "d "  "e "n "d "- "c "o "m "m "e "n "t "  "p "a "t "t "e "r "n "s ", "I "n "m "o "s "  "i "s "  "a "  "b "i "n "a "r "y "  "f "o "r "m "a "t )
  53.      set y 4
  54.      write-area x y ( "  "S "e "t "  "f "o "l "d "  "l "a "n "g "u "a "g "e "  "t "o "  "  "  "  "  "  "  "  "  "  "  "  "  "  "  "  "  "  "  "  "  "  "  "  "  "  "  "  "  "  "  "  "  "  "  "  "  "  "  "  "  "  "  "  "  "  "  "  "  "  "  "  "  "  "  "  "  )
  55.      set x 999
  56.      write-area x y ( "  )
  57.    )
  58. )
  59. ;OCL}}}
  60. ( undeclare ( x y ) )
  61. ;OCL}}}
  62. ;OCL{{{  read-newfile-macro
  63. ( defvar ( startup ) )
  64. ( deffun rnfm
  65.    ( if not(startup)
  66.       ( set-area 4
  67.         delete-mode-autosave
  68.         delete-mode-hash-shift
  69.         set-file-unchanged
  70.         edit-menu
  71.       )
  72.      fi
  73.      delete-mode-view
  74.      delete-mode-overwrite
  75.      add-mode-position
  76.      if not(startup)
  77.       ( set startup 1
  78.         message-exit ( "[ "emacs "  "cursormotion "  "( "C-[BFNP] ") "  "also "  "supported "! "] )
  79.       )
  80.      fi
  81.    )
  82. )
  83. ( read-newfile-macro rnfm )
  84. ( undeclare ( startup rnfm ) )
  85. ;OCL}}}
  86. ;OCL{{{  mori-exit-origami
  87. ( defvar ( eo-used ) )
  88. ( deffun mori-exit-origami
  89.    ( if test-file-changed
  90.       ( if <>(-(key-count 1) eo-used)
  91.          ( set eo-used key-count
  92.            message-exit
  93.             ( "[ "File "  "changed, "  "use "  "quit "  "again, "  "to "  "ignore "  "changes! "] )
  94.          )
  95.         else
  96.          ( set-file-unchanged )
  97.         fi
  98.       )
  99.      fi
  100.      if test-file-changed
  101.       ( message-exit ( "[ "File "  "changed! "] ) )
  102.      fi
  103.      exit-buffer
  104.    )
  105. )
  106. ;OCL}}}
  107. ;OCL{{{  folding
  108. @lib regions
  109. ;OCL{{{  start-folding
  110. ( deffun start-fold
  111.    ( local
  112.       ( modify-behaviour )
  113.       ( set modify-behaviour -2
  114.         create-fold
  115.         fold-menu
  116.         folding
  117.         set-start-mark
  118.         set-end-mark
  119.       )
  120.    )
  121. )
  122. ;OCL}}}
  123. ;OCL{{{  end-folding
  124. ( deffun end-fold
  125.    ( if and(test-folding <>(ocl-argument 0)) ( create-fold ) fi
  126.      edit-menu
  127.      edit
  128.    )
  129. )
  130. ;OCL}}}
  131. ;OCL{{{  fold
  132. ( deffun fold
  133.    ( set-end-mark
  134.      end-fold
  135.      if and(=(start-x end-x) =(start-y end-y))
  136.       ( create-fold create-fold )
  137.      else
  138.       ( fold-region
  139.         if folderr
  140.          ( message ("Cannot "  "fold! ) )
  141.         fi
  142.       )
  143.      fi
  144.    )
  145. )
  146. ;OCL}}}
  147. ;OCL{{{  mori-set-language
  148. ( defvar ( key ) )
  149. ( deffun mori-set-language
  150.    ( if and(test-folding <>(ocl-argument 0)) ( create-fold ) fi
  151.      lang-menu
  152.      set-language
  153.      edit
  154.      while in-prompt
  155.       ( prompt-char-counter key ()
  156.         insert-ascii key
  157.       )
  158.      edit-menu
  159.    )
  160. )
  161. ( undeclare ( key ) )
  162. ;OCL}}}
  163. ( key-not-bound-macro end-fold )
  164. ( abort-macro end-fold )
  165. ;OCL}}}
  166. ;OCL{{{  mouse
  167. @lib go-mouse
  168. ;OCL}}}
  169. ;OCL{{{  bindings
  170. ;OCL{{{  get alias
  171. @use ( alias ) @lib origami-fun/terms @use not( alias )
  172. ;OCL}}}
  173. ( keybind abort ( C-C ) )
  174. ;OCL{{{  edit
  175. ( mode edit
  176.    ( terminal
  177.       ( @use ( terms ) @lib origami-fun/terms @use not( terms ) )
  178.       ( keybind center-and-redraw-display ( C-Q C-Q ))
  179.       ( keybind center-and-redraw-display ( $refresh ))
  180.       ( keybind next-line ( C-X ) )
  181.       ( keybind next-line ( C-N ) )
  182.       ( keybind next-line ( $down ) )
  183.       ( keybind previous-line ( C-E ) )
  184.       ( keybind previous-line ( C-P ) )
  185.       ( keybind previous-line ( $up ) )
  186.       ( keybind forward-character ( C-D ) )
  187.       ( keybind forward-character ( C-F ) )
  188.       ( keybind forward-character ( $right ) )
  189.       ( keybind backward-character ( C-S ) )
  190.       ( keybind backward-character ( C-B ) )
  191.       ( keybind backward-character ( $left ) )
  192.       ( keybind open-fold ( C-W ) )
  193.       ( keybind open-fold ( $open ) )
  194.       ( keybind close-fold ( C-R ) )
  195.       ( keybind close-fold ( $close ) )
  196.       ( keybind newline-and-indent ( C-J ) )
  197.       ( keybind newline-and-indent ( C-M ) )
  198.       ( keybind delete-previous-character ( C-H ) )
  199.       ( keybind delete-line ( C-L ) )
  200.       ( keybind delete-line ( $delline ) )
  201.       ( keybind mori-exit-origami ( C-Q "q ) )
  202.       ( keybind mori-exit-origami ( $exit ) )
  203.       ( keybind save-file ( C-Q "s ) )
  204.       ( keybind save-file ( $save ) )
  205.       ( keybind start-fold ( C-[ C-[ ) )
  206.       ( keybind start-fold ( $select ) )
  207.       ( keybind unfold-fold ( C-U ) )
  208.    )
  209. )
  210. ;OCL}}}
  211. ;OCL{{{  folding
  212. ( mode folding
  213.    ( terminal
  214.       ( @use ( terms ) @lib origami-fun/terms @use not( terms ) )
  215.       ( keybind center-and-redraw-display ( C-Q C-Q ))
  216.       ( keybind center-and-redraw-display ( $refresh ))
  217.       ( keybind next-line ( C-X ) )
  218.       ( keybind next-line ( C-N ) )
  219.       ( keybind next-line ( $down ) )
  220.       ( keybind previous-line ( C-E ) )
  221.       ( keybind previous-line ( C-P ) )
  222.       ( keybind previous-line ( $up ) )
  223.       ( keybind forward-character ( C-D ) )
  224.       ( keybind forward-character ( C-F ) )
  225.       ( keybind forward-character ( $right ) )
  226.       ( keybind backward-character ( C-S ) )
  227.       ( keybind backward-character ( C-B ) )
  228.       ( keybind backward-character ( $left ) )
  229.       ( keybind open-fold ( C-W ) )
  230.       ( keybind open-fold ( $open ) )
  231.       ( keybind close-fold ( C-R ) )
  232.       ( keybind close-fold ( $close ) )
  233.       ( keybind fold ( "f  ) )
  234.       ( keybind mori-set-language ( "l ) )
  235.    )
  236.    ( keybind - ( * ) )
  237. )
  238. ;OCL}}}
  239. ( mouse-buttons go-mouse-position go-mouse-position go-mouse-position )
  240. ;OCL}}}
  241. ;OCL{{{  reference tree
  242. @if-using ( )
  243. ;OCL{{{  settings
  244. @start-reference-copy ref-sets
  245. @ref-top-start-box ********
  246. @ref-top-end-box
  247. @ref-sub-start-box /-\||\-/
  248. @ref-sub-end-box
  249.  
  250. @ref-menu 1 quit Quit ret Back next #(Next) prev Prev 1234567890
  251.  
  252. @ref-class-id 1
  253.  
  254. @ref-indent 3 78 4 2
  255. @end-reference-copy
  256. ;OCL}}}
  257. ;OCL{{{  reference frame
  258. @start-reference-copy ref
  259. @ref-see-also See also in %s.
  260. ;OCL{{{  @ref-header BasicOrigami-Reference-Card
  261. @ref-title BasicOrigami Reference-Card
  262. @ref-author W. Stumvoll
  263. This is the reference-file for `BasicOrigami', a beginners binding for the
  264. folding-editor Origami.
  265. ;OCL}}}
  266. ;OCL{{{  BasicOrigami-Reference-Card
  267. ;OCL}}}
  268. @end-reference-copy
  269. ;OCL}}}
  270. ;OCL{{{  reference frame
  271. ;OCL}}}
  272. @fi
  273. ;OCL}}}
  274.